/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.oa.dao.impl;

import com.legendshop.dao.impl.GenericDaoImpl;
import com.legendshop.dao.support.CriteriaQuery;
import com.legendshop.dao.support.EntityCriterion;
import com.legendshop.dao.support.PageSupport;
import com.legendshop.oa.dao.ProjectCostDao;
import com.legendshop.oa.model.ProjectCost;

import java.util.List;

/**
 * The Class ProjectCostDaoImpl.
  * 项目费用表Dao实现类
 */

public class ProjectCostDaoImpl extends GenericDaoImpl<ProjectCost, Long> implements ProjectCostDao  {
     
	/**
	 *  根据商城获取项目费用表列表
	 */     
    public List<ProjectCost> getProjectCost(String userName){
   		return this.queryByProperties(new EntityCriterion().eq("userName", userName));
    }
    
   	/**
	 *  根据Id获取项目费用表
	 */
	public ProjectCost getProjectCost(Long id){
		return getById(id);
	}

   /**
	 *  删除项目费用表
	 */	
    public int deleteProjectCost(ProjectCost projectCost){
    	return delete(projectCost);
    }

   /**
	 *  保存项目费用表
	 */		
	public Long saveProjectCost(ProjectCost projectCost){
		return save(projectCost);
	}

   /**
	 *  更新项目费用表
	 */		
	public int updateProjectCost(ProjectCost projectCost){
		return update(projectCost);
	}

   /**
	 *  查询项目费用表列表
	 */		
	public PageSupport getProjectCost(CriteriaQuery cq){
		return queryPage(cq);
	}
	
 }
